package com.lby.graduation;
import com.lby.graduation.entity.Goods;
import com.lby.graduation.entity.User;
import com.lby.graduation.mapper.UserMapper;
import com.lby.graduation.service.GoodsService;
import com.lby.graduation.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
public class test {

    @Autowired
    private UserService userService;

    @Resource
    private UserMapper userMapper;
    @Resource
    private GoodsService goodsService;

    @Test
    void test1(){
       List<User> userList= userService.list(null);
        List<Goods> goodsList = goodsService.list(null);
        System.out.println(userList);
        System.out.println(goodsList);
    }

    @Test
    void test2(){
        List<User> userList= userMapper.selectList(null);
        System.out.println(userList);
    }
}
